package cn.uniqueinfo.dp.controller;

import cn.uniqueinfo.dp.vo.RoleMenuVO;
import lombok.extern.slf4j.Slf4j;
import cn.uniqueinfo.dp.controller.base.BaseController;
import cn.uniqueinfo.dp.service.IUserRoleService;
import cn.uniqueinfo.dp.vo.UserRoleVO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author:朱元勋
 * @mail:395910063@qq.com
 * @date:2019-02-13 11:25:07
 * @description:用户角色对应表
 */
@Slf4j
@Controller
@RequestMapping(value = "/userrole")
public class UserRoleController extends BaseController<UserRoleVO> {
    private IUserRoleService service;

    public UserRoleController(IUserRoleService service) {
        this.service = service;
        this.baseService = service;
        this.ctlName = "userrole";
        this.tipName = "用户角色对应表";
    }

    @GetMapping(value = "/findByUid")
    @ResponseBody
    public List<UserRoleVO> findByUid(Long uid) {
        return this.service.findByUid(uid);
    }
}
